1. Technical Field of the Invention
The present invention relates to a geomagnetism measurement apparatus.
2. Description of the Related Art
In recent years, there has been developed a three-dimensional magnetic sensor mounted in a portable instrument, such as a mobile phone, or a traveling object, such as a car, for detecting geomagnetism. Generally, a three-dimensional magnetic sensor includes three magnetic sensor modules for dividing a vector of a magnetic field into three directional components perpendicular to each other to detect each directional component of the vector as a scalar quantity, and outputs three-dimensional vector data having the scalar quantities output by the three magnetic sensor modules as three components.
An instrument, such as a mobile phone, having such a three-dimensional magnetic sensor mounted therein, frequently includes a part generating a magnetic field, such as various kinds of metal that can be magnetized and various electric circuits. In this case, vector data output by the three-dimensional magnetic sensor also include another vector representing a magnetic field generated by the part mounted in the instrument in addition to a vector representing geomagnetism. In order to correctly detect a value of geomagnetism, therefore, it is necessary to perform a correction process for removing another vector representing an internal magnetic field generated by the part of the instrument from the vector data output by the three-dimensional magnetic sensor. A component removed from the data output from the three-dimensional magnetic sensor to obtain a correct value of geomagnetism to be detected in the correction process is referred to as an offset.
An internal magnetic field is a magnetic field generated by the part of the instrument. The internal magnetic field has a uniform direction with respect to the instrument and uniform magnitude. When viewed from the three-dimensional magnetic sensor mounted in the instrument, the internal magnetic field is represented as a vector having a uniform indirection and uniform magnitude even if the posture of the instrument is changed.
On the other hand, geomagnetism is a magnetic field having a horizontal component directed to a north magnetic pole and a vertical component of a magnetic dip direction. The geomagnetism is a magnetic field having a uniform direction and uniform magnitude with respect to the ground. In a case where the posture of the instrument is changed with respect to the ground, therefore, the direction of the geomagnetism viewed from the instrument is also changed. That is, when viewed from the three-dimensional magnetic sensor mounted in the instrument, the geomagnetism is represented as a vector having a direction changed as the posture of the instrument is changed and having uniform magnitude.
In a case where a plurality of magnetic data are acquired in a state in which the three-dimensional magnetic sensor is rotated upward and downward and from side to side so that the posture of the three-dimensional magnetic sensor is greatly changed three-dimensionally, a plurality of coordinates indicated by a plurality of vector data sequentially output by the three-dimensional magnetic sensor are distributed in the vicinity of a spherical surface having a central point, the coordinates of which is indicated by the vector representing the internal magnetic field, and having a radius which corresponds to the magnitude of the vector representing the geomagnetism.
Patent literature 1 discloses a method of using properties of the geomagnetism and the internal magnetic field as described above to calculate a vector having a uniform direction and magnitude representing the internal magnetic field based on a plurality of magnetic data acquired in a state in which the posture of the three-dimensional magnetic sensor is changed and performing a correction process for removing the vector representing the internal magnetic field from output data as an offset to calculate a correct direction of the geomagnetism.
Meanwhile, in a case where the part of the instrument, in which the three-dimensional magnetic sensor is mounted, has a soft magnetic material, a plurality of coordinates indicated by the vector data sequentially output from the three-dimensional magnetic sensor are not distributed in the vicinity of a spherical surface but are distributed in the vicinity of an ellipsoid due to the influence of a magnetic field generated as the result that the soft magnetic material is magnetized. That is, a plurality of coordinates to be distributed in the vicinity of a spherical surface if the influence of the magnetic field generated by the soft magnetic material is not present are deviated due to the influence of a magnetic field generated by the soft magnetic material so that the coordinates expand and contract in main axis directions of an ellipsoid with the result that the coordinates are distributed in the vicinity of an ellipsoid having the same central point as the spherical surface. This phenomenon is referred to as a soft ion effect. Namely, the soft ion effect is a phenomenon in which a plurality of coordinates indicated by the vector data sequentially output from the three-dimensional magnetic sensor is distributed in the vicinity of an ellipsoid due to the influence of a magnetic field generated as the result that the soft magnetic material is magnetized as described above.
In a case where the soft iron effect is generated, it is not possible to calculate a correct direction of the geomagnetism based on the coordinates present in the vicinity of the ellipsoid. In order to calculate a correct direction of the geomagnetism, it is necessary to perform coordinate conversion for moving the coordinates on the ellipsoid to coordinates on the spherical surface, i.e. coordinate conversion for moving the coordinates on the ellipsoid so that the coordinates on the ellipsoid expand and contract in the main axis directions of the ellipsoid with the central point of the ellipsoid as the start point. A process of converting the coordinates on the ellipsoid into coordinates on the spherical surface is referred to as “ellipsoidal correction”. It is possible to calculate the direction of the geomagnetism by subtracting coordinates indicated by the central point of the spherical surface from coordinates after coordinate conversion calculated by performing ellipsoidal correction.
Non-patent literature 1 and non-patent literature 2 disclose methods of calculating a coordinate conversion matrix to perform coordinate conversion for converting coordinates on an ellipsoid indicated by the vector data output from the three-dimensional magnetic sensor into coordinates on a spherical surface in a case where a soft iron effect is generated.
Specifically, a simultaneous linear equation representing that coordinates indicated by a plurality of vector data sequentially output from the three-dimensional magnetic sensor are located on an ellipsoid is set, and a matrix as a candidate of the coordinate conversion matrix is calculated based on a value presumed to be a solution of the simultaneous linear equation. After that, the matrix as the candidate of the coordinate conversion matrix is applied to an initial value of a nonlinear optimization operation to minimize a value of a nonlinear function representing an error between the coordinates after coordinate conversion and the spherical surface, and components of the matrix as the candidate of the coordinate conversion matrix are sequentially renewed to calculate an optimal value of the coordinate conversion matrix, i.e. the coordinate conversion matrix to minimize an error between the coordinates after coordinate conversion and the spherical surface.    [Patent Literature 1] Japanese Patent Application Publication No. 2007-240270